package org.eliza.base.basicx.datatypex


fun Char() {
    println("=====Char====")

    val oneChar: Char = '1'
    val oneString: String = "1"// Long
    println("oneChar  :$oneChar")
    println("oneString:$oneString")

}

fun Boolean() {
    println("=====Boolean====")
    val myTrue: Boolean = true
    val boolNull: Boolean? = null

    println(!myTrue)
    // false
    println(boolNull) //在 JVM 平台，布尔对象的可空引用是装箱的 Java 类，类似于数字。
    val boolNull1: Boolean? = myTrue
    val boolNull2: Boolean? = myTrue
    println(boolNull1 == boolNull2)
}

private fun method() {
    println("======Method====")
    var True = true
    var False = false

    println("boolean.not       :  ${True.not()}")
    println("boolean.or        :  ${True.or(False)}")
    println("boolean.xor       :  ${True.xor(False)}")
    println("boolean.and       :  ${True.and(False)}")
    println("boolean.to        :  ${True.to(False)}")
    println("boolean.rangeTo   :  ${True.rangeTo(False)}")
    println("boolean.rangeUntil:  ${True.rangeUntil(False)}")

    println("boolean.rangeTo   :  ${True.rangeTo(true)}")
    println("boolean.rangeUntil:  ${True.rangeUntil(true)}")
}

private  fun main() {

    Boolean()
    method()
}